package com.castle.fortress.admin.cms.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * cms栏目/导航菜单配置表 实体类
 *
 * @author castle
 * @since 2022-03-09
 */
@Data
@ApiModel(value = "cmsChannel对象", description = "cms栏目/导航菜单配置表")
public class CmsChannelDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键")
	@JsonProperty("id")
	private Long id;
	@ApiModelProperty(value = "标题")
	@JsonProperty("title")
	private String title;
	@ApiModelProperty(value = "描述")
	@JsonProperty("info")
	private String info;
	@ApiModelProperty(value = "关键字")
	@JsonProperty("keywords")
	private String keywords;
	@ApiModelProperty(value = "名称")
	@JsonProperty("name")
	private String name;
	@ApiModelProperty(value = "标识")
	@JsonProperty("code")
	private String code;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "上级栏目")
	@JsonProperty("parentId")
	private Long parentId;
	@ApiModelProperty(value = "所有上级栏目")
	@JsonProperty("parents")
	private String parents;
	@ApiModelProperty(value = "访问地址")
	@JsonProperty("url")
	private String url;
	@ApiModelProperty(value = "是否显示")
	@JsonProperty("showflag")
	private Boolean showflag;
	@ApiModelProperty(value = "属性")
	@JsonProperty("category")
	private Integer category;
	@ApiModelProperty(value = "图片")
	@JsonProperty("image")
	private String image;
	@ApiModelProperty(value = "内容")
	@JsonProperty("content")
	private String content;
	@ApiModelProperty(value = "外链地址")
	@JsonProperty("weburl")
	private String weburl;
	@ApiModelProperty(value = "列表模板")
	@JsonProperty("listtp")
	private String listtp;
	@ApiModelProperty(value = "封面模板")
	@JsonProperty("covertp")
	private String covertp;
	@ApiModelProperty(value = "文章模板")
	@JsonProperty("articletp")
	private String articletp;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "模型")
	@JsonProperty("model")
	private Long model;
	@ApiModelProperty(value = "排序")
	@JsonProperty("sort")
	private Integer sort;
	@ApiModelProperty(value = "是否审核")
	@JsonProperty("auditflag")
	private Boolean auditflag;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "修改人")
	@JsonProperty("updateUser")
	private Long updateUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "修改时间")
	@JsonProperty("updateTime")
	private Date updateTime;
	@JsonProperty("children")
	private List<CmsChannelDto> children;
	@ApiModelProperty(value = "是否有子类")
	@JsonProperty("hasChildren")
	private Boolean hasChildren=false;
	//扩展字段
	@JsonProperty("cols")
	private List<CmsColConfigDto> cols;
	@ApiModelProperty(value = "当前选中的样式")
	@JsonProperty("activeClass")
	private String activeClass;
	/**
	 * Map<String,Object>
	 *     id:审核人员id；realName：审核人员名称; isSelf：是否本级
	 */
	@ApiModelProperty(value = "该栏目审核人员集合")
	@JsonProperty("auditUser")
	private List<Map<String,Object>> auditUser;
	@ApiModelProperty(value = "是否有操作权限")
	@JsonProperty("hasAuth")
	private Boolean hasAuth;


}
